home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: OL 0.005 (26 Sep 1994) ***
- **
- ** (c) © 1994 Oliver Clouth
- **
- ** Function : Pre-Link
- **
- **
- */
-
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT' /* lock GUI, gain access */
- OPTIONS FAILAT 6 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- host = ADDRESS() /* get GED's port */
-
- /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY ANYTEXT'
-
- if (result = 'TRUE') then
-
- do
- 'QUERY DOC VAR OLDNAME' /* remember current file name */
-
- 'QUERY PATH Var PFAD'
- 'QUERY FILE VAR FNAME' /* Nur den Filenamen in Var FNAME */
-
- Name = left(FNAME, Pos('.', FNAME) - 1)
-
- call pragma 'D', PFAD /* Aktuelles Verzeichnis wechseln */
- call pragma 'Stack', 10000
-
- shell /* address shell */
-
- 'Oberon-A:C/OL SRC Code/ DST Code/' Name
-
- ok = (RC = 0)
-
- shell /* address host (GoldED) */
-
- 'NAME NEW ' || oldname /* restore old file name */
- end
-
- else do
-
- if (isGerman) then
- 'REQUEST BODY="Kein Text vorhanden ?!"'
- else
- 'REQUEST BODY="Text buffer is empty ?!"'
- end
-
- 'UNLOCK' /* VERY important: unlock GUI */
- Exit
-